package seasons;

public class Seasons {

	private int month;
	private int day;

	public Seasons(int m, int d) {
		month = m;
		day = d;
	}

	public String getSeason() {
		String season;
		switch (month) {
		case 1:
		case 2:
		case 3:
			season = "Winter";
			break;
		case 4:
		case 5:
		case 6:
			season = "Spring";
			break;
		case 7:
		case 8:
		case 9:
			season = "Summer";
			break;
		case 10:
		case 11:
		case 12:
			season = "Fall";
			break;
		default:
			season = "Invalid date";
			break;
		}
		if (day < 1 || day > 31)
			season = "Invalid date";
		else if (day >= 21) {
			switch (month) {
			case 3:
				season = "Spring";
				break;
			case 6:
				season = "Summer";
				break;
			case 9:
				season = "Fall";
				break;
			case 12:
				season = "Winter";
				break;
			}
		}
		return season;
	}

}
